#include <stdio.h>
#include <ctype.h>

#define SIZE 80

/* int main()
{
    char s[SIZE + 1];
    // char t[SIZE + 1];
    gets(s);
    int i;
    for (i = 0; s[i] != 0; i++)
    {
        if (isalpha(s[i]))
        {
            while (isalpha(s[i]))
            {
                printf("%c", s[i++]);
            }
            printf("\n");
        }
    }
    return 0;
} */

int main()
{
    char s[SIZE + 1];
    int c, i = 0;
    while((c = getchar()) != '\n')
    {
        s[i++] = c;
    }
    s[i] = '\0';
    int len = i;
    for (i = 0; i < len; i++)
    {
        if (isalpha(s[i]))
        {
            while (isalpha(s[i]))
                printf("%c", s[i++]);
            printf("\n");
        }
    }
    return 0;
}